package com.guoyh.bilbase.pop.pop

import android.content.Context
import androidx.databinding.DataBindingUtil
import androidx.databinding.ViewDataBinding
import com.lxj.xpopup.core.HorizontalAttachPopupView

/**
* @auther      guoyh
* @Date  6/8/21 2:59 PM
* @Describe    横向 依附于某个View
*/
abstract class BaseHorizontalAttachPopupView<DB : ViewDataBinding>(context: Context) : HorizontalAttachPopupView(context) {

    lateinit var mDataBind: DB

    override fun getImplLayoutId(): Int {
        return getImplLayout()
    }


    override fun onCreate() {
        super.onCreate()
        mDataBind = DataBindingUtil.bind(popupImplView)!!

        onViewCreate()
    }

    abstract fun getImplLayout(): Int
    abstract fun onViewCreate()

}